/**
 * Created by fandongyang on 2017/7/26.
 */
import {createStore, applyMiddleware} from 'redux';
import Reducers from '../reducers';
import thunk from 'redux-thunk';

import logger from 'redux-logger';
let middlewares = [];

middlewares.push(logger);
middlewares.push(thunk);

const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);

export default function configureStore(initialState) {
    return createStoreWithMiddleware(Reducers, initialState);
}
